package io;

import java.io.File;
import java.util.Arrays;
import java.util.List;

public class IODemo4 {
    public static void main(String[] args) {
        //获取文件夹下的文件
        File file = new File("test-dir");
        String[] result = file.list();
        System.out.println(Arrays.toString(result));
        File[] results = file.listFiles();
        System.out.println(Arrays.toString(results));
    }
}
